#!/bin/env python

import time
import cv2
import numpy as np

pic_path = "../resource/pic/img_005.jpg"
windowName = "Laplacian"

pic1 = cv2.imread(pic_path)
pic1_h, pic1_w, pic1_chn = pic1.shape

# 拉普拉斯算子
img = cv2.Laplacian(pic1, -1, ksize=3)

cv2.namedWindow(windowName, cv2.WINDOW_NORMAL)
cv2.resizeWindow(windowName, 500 * 2, 500)
cv2.imshow(windowName, np.hstack((pic1, img)))

while True:
    if cv2.waitKey(0) == ord('q'):
        break

print('销毁窗口')
cv2.destroyAllWindows()


